*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================
   1. VARIABLES GLOBALES
   Definidas en brand.css (se carga antes que este archivo)
   ============================================================ */

/* ============================================================
   2. DISEÑO HEADER
   ============================================================ */
 .header-overlay {
    position: sticky;
    top:0;
    background: var(--blue-teavalo);
    z-index: 80;
    backdrop-filter: blur(12px);
}

/* ============================================================
   3. RESET / ESTILOS BASE
   ============================================================ */
a {
    text-decoration: none;
    display: block;
}
/* ============================================================
   4. LOGOTIPO
   ============================================================ */

.imgsvg{
    height: 27px;
    width: auto;
    color: #fff;
}

/* ============================================================
   5. NAVBAR CONTENEDOR PRINCIPAL
   ============================================================ */
.navbar-card {
    font-family: var(--header-font);
    display: flex;
    gap: 20px;
    height: 90px;
    max-width: var(--maximum-dimension);
    margin-inline: auto;
    padding-inline: var(--pad);
}

/* ============================================================
   6. NAVEGACIÓN DESKTOP (LINKS CENTRALES)
   ============================================================ */

.nav-links{
    margin-left: auto;
    display: flex;
    gap: 2px;
    align-items: center;
}

.nav-links a,
.nav-links .btn {
    font-family: inherit;
}

.nav-links a {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--white-teavalo);
    transition: color 0.2s ease;
    padding: 8px 12px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white-hover);
}

/* Los botones son el <a> mismo (sin span interno) para no sumar paddings:
   altura = línea (0.84rem * 1.5 ≈ 20px) + 16px, igual que un link normal */
.nav-links .button-credit,
.nav-links .button-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 50px;
    line-height: 1.5;
    white-space: nowrap;
    color: #fff;
    transition: .2s;
}

.nav-links .button-credit {
    background: var(--orange-teavalo);
    box-shadow: 0 8px 22px rgba(255, 111, 22, .3);
    padding: 8px 14px;
}

.nav-links .button-login {
    background: var(--blue-teavalo);
    border: 2px solid rgba(255, 255, 255, .28);
    padding: 6px 12px;
}

.nav-links .button-credit:hover {
    background: var(--blue-teavalo);
    transform: translateY(-2px);
}

.nav-links .button-login:hover {
    transform: translateY(-2px);
}

/* ============================================================
   7. PERFIL, HAMBURGUESA Y MENÚ MÓVIL
   Menú de perfil y panel móvil comparten fondo crema, texto azul oscuro
   y el mismo cierre (clic fuera / volver a pulsar su botón).
   ============================================================ */
.nav-actions{
    margin-left: auto;
}

@media (min-width: 1400px){
    .nav-actions{ margin-left: 0; }
}

.profile-menu{
    position: relative;
}

.profile-btn,
.hamburger{
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.profile-btn{
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, .28);
    font-family: inherit;
    font-size: .84rem;
    font-weight: 500;
    transition: border-color .2s ease;
}

.profile-btn:hover,
.profile-btn[aria-expanded="true"]{
    border-color: #fff;
}

.profile-btn__avatar{
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-btn__avatar--initials{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    color: var(--blue-dark-teavalo);
    font-size: .75rem;
    font-weight: 700;
}

.profile-btn__name{
    max-width: 90px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-btn__arrow{
    width: 7px;
    height: 7px;
    margin: -3px 2px 0 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.profile-btn[aria-expanded="true"] .profile-btn__arrow{
    transform: translateY(3px) rotate(-135deg);
}

.profile-dropdown{
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 90;
    min-width: 100%;
    padding: 6px;
    background: var(--cream);
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(3, 19, 74, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.profile-dropdown.is-open{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown a{
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--blue-dark-teavalo);
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
}

.profile-dropdown a:hover{
    background: rgba(3, 19, 74, .08);
}

.hamburger{
    padding: 6px;
}

/* Panel lateral: entra desde la derecha */
.mobile-overlay{
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(3, 19, 74, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}

.mobile-overlay.is-open{
    opacity: 1;
    visibility: visible;
}

.mobile-panel{
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    width: min(86vw, 340px);
    padding: 20px 24px 28px;
    overflow-y: auto;
    background: var(--cream);
    color: var(--blue-dark-teavalo);
    font-family: var(--header-font);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s ease, visibility .3s;
    border-radius: 30px;
    height:400px;
}

.mobile-panel.is-open{
    transform: translateX(0);
    visibility: visible;
}

.mobile-panel__close{
    align-self: flex-end;
    padding: 6px;
    border: 0;
    background: transparent;
    color: var(--blue-dark-teavalo);
    cursor: pointer;
}

.mobile-panel__links{
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.mobile-link{
    padding: 9px 4px;
    border-bottom: 1px solid rgba(3, 19, 74, .1);
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue-dark-teavalo);
    transition: color .2s ease;
}

.mobile-link:hover,
.mobile-link.active{
    color: var(--orange-teavalo);
}

/* Mismos botones que el header de escritorio, en una fila 50-50 anclada al fondo */
.mobile-panel__actions{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}

.mobile-panel__login,
.mobile-panel__credit{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 6px;
    border-radius: 50px;
    text-align: center;
    font-size: .84rem;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    transition: .2s;
}

.mobile-panel__login{
    background: var(--blue-teavalo);
}

.mobile-panel__login:hover{
    color: #fff;
    transform: translateY(-2px);
}

.mobile-panel__login:focus{
    color: #fff;
}

.mobile-panel__credit{
    background: var(--orange-teavalo);
    box-shadow: 0 8px 22px rgba(255, 111, 22, .3);
}

.mobile-panel__credit:hover{
    background: var(--blue-teavalo);
    transform: translateY(-2px);
    color:#fff;
}

.mobile-panel__credit:focus{
    color: #fff;
}

